home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume6 / xdir / patch3 next >
Encoding:
Internet Message Format  |  1990-02-27  |  17.0 KB

  1. Path: uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!sun-barr!newstop!sun!turnpike!argv
  2. From: argv%turnpike@Sun.COM (Dan Heller)
  3. Newsgroups: comp.sources.x
  4. Subject: v06i003: xdir -- Directory Browser, Patch3
  5. Message-ID: <132317@sun.Eng.Sun.COM>
  6. Date: 28 Feb 90 09:46:22 GMT
  7. Sender: news@sun.Eng.Sun.COM
  8. Lines: 610
  9. Approved: argv@sun.com
  10.  
  11. Submitted-by: Erik M. van der Poel <uunet!kddlab!sran8.sra.co.jp!erik>
  12. Posting-number: Volume 6, Issue 3
  13. Archive-name: xdir/patch3
  14. Patch-To: xdir: Volume 4, Issue 14-15,97
  15. Patch-To: xdir: Volume 5, Issue 14
  16.  
  17. This is the third set of patches for the SelFile directory browser
  18. package.
  19.  
  20. These patches are for people with patchlevel 2. People with the R4
  21. version (contrib/clients/selfile) should wait for the next set of
  22. patches, which take the patchlevel from 3 to 4.
  23.  
  24.     * Athena widget include files have moved to <X11/Xaw> in R4.
  25.  
  26.     * R4 Athena widgets use Xaw... instead of Xt...
  27.  
  28.     * The R4 Athena Text widget has a new programmer interface.
  29.  
  30.     * It is still possible to compile in a pre-R4 environment using
  31.       -DSEL_FILE_PRE_R4_XAW_XMU.
  32.  
  33.     * The patchlevel.h file has been updated to patch level three.
  34.  
  35. --
  36. Erik M. van der Poel                  erik@sra.co.jp             (Japan)
  37. SRA, 1-1-1 Hirakawa-cho, Chiyoda-ku   erik%sra.co.jp@uunet.uu.net  (USA)
  38. Tokyo 102 Japan. TEL +81-3-234-2692   erik%sra.co.jp@mcvax.uucp (Europe)
  39.  
  40. Prereq: 2
  41. *** ../old/patchlevel.h    Mon Jan 29 13:57:04 1990
  42. --- patchlevel.h    Mon Jan 29 13:58:20 1990
  43. ***************
  44. *** 1 ****
  45. ! #define PATCHLEVEL 2
  46. --- 1 ----
  47. ! #define PATCHLEVEL 3
  48. *** ../old/Draw.c    Mon Jan 29 13:57:08 1990
  49. --- Draw.c    Mon Jan 29 13:58:18 1990
  50. ***************
  51. *** 1,5 ****
  52.   #ifndef lint
  53. ! static char rcsid[] = "$Header: Draw.c,v 1.11 89/09/28 16:32:19 erik Exp $";
  54.   #endif
  55.   
  56.   /*
  57. --- 1,5 ----
  58.   #ifndef lint
  59. ! static char rcsid[] = "$Header: Draw.c,v 1.2 89/12/15 11:59:08 kit Exp $";
  60.   #endif
  61.   
  62.   /*
  63. ***************
  64. *** 34,43 ****
  65. --- 34,51 ----
  66.   #include <X11/StringDefs.h>
  67.   
  68.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR)
  69.   #include <Xw/Xw.h>
  70.   #include <Xw/ScrollBar.h>
  71.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR) */
  72. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  73.   #include <X11/Scroll.h>
  74. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  75. + #include <X11/Xaw/Scrollbar.h>
  76. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  77.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR) */
  78.   
  79.   #define SF_DEFAULT_FONT "9x15"
  80. ***************
  81. *** 223,229 ****
  82. --- 231,243 ----
  83.           XtSetValues(selFileHScrolls[n], arglist, i);
  84.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR) */
  85.           if ((SFdirPtr + n < SFdirEnd) && dir->nEntries && dir->nChars) {
  86. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  87.               XtScrollBarSetThumb(
  88. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  89. +             XawScrollBarSetThumb(
  90. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  91.                   selFileVScrolls[n],
  92.                   (float) (((double) dir->vOrigin) /
  93.                       dir->nEntries),
  94. ***************
  95. *** 231,237 ****
  96. --- 245,257 ----
  97.                       ? dir->nEntries : SFlistSize)) /
  98.                       dir->nEntries)
  99.               );
  100. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  101.               XtScrollBarSetThumb(
  102. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  103. +             XawScrollBarSetThumb(
  104. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  105.                   selFileHScrolls[n],
  106.                   (float) (((double) dir->hOrigin) / dir->nChars),
  107.                   (float) (((double) ((dir->nChars <
  108. ***************
  109. *** 239,248 ****
  110. --- 259,277 ----
  111.                       SFcharsPerEntry)) / dir->nChars)
  112.               );
  113.           } else {
  114. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  115.               XtScrollBarSetThumb(selFileVScrolls[n], (float) 0.0,
  116.                   (float) 1.0);
  117.               XtScrollBarSetThumb(selFileHScrolls[n], (float) 0.0,
  118.                   (float) 1.0);
  119. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  120. +             XawScrollBarSetThumb(selFileVScrolls[n], (float) 0.0,
  121. +                 (float) 1.0);
  122. +             XawScrollBarSetThumb(selFileHScrolls[n], (float) 0.0,
  123. +                 (float) 1.0);
  124. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  125.           }
  126.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR) */
  127.   
  128. ***************
  129. *** 310,316 ****
  130. --- 339,350 ----
  131.   
  132.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR) */
  133.   
  134. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  135.       XtScrollBarSetThumb(
  136. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  137. +     XawScrollBarSetThumb(
  138. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  139.           selFileVScrolls[n],
  140.           (float) (((double) dir->vOrigin) / dir->nEntries),
  141.           (float) (((double) ((dir->nEntries < SFlistSize) ?
  142. ***************
  143. *** 610,616 ****
  144. --- 644,656 ----
  145.           XtSetValues(selFileVScrolls[n], arglist, i);
  146.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR) */
  147.           if (dir->nEntries) {
  148. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  149.               XtScrollBarSetThumb(
  150. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  151. +             XawScrollBarSetThumb(
  152. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  153.               selFileVScrolls[n],
  154.               (float) (((double) dir->vOrigin) / dir->nEntries),
  155.               (float) (((double) ((dir->nEntries < SFlistSize) ?
  156. ***************
  157. *** 904,910 ****
  158. --- 944,956 ----
  159.           float    f;
  160.   
  161.           f = ((double) new) / dir->nEntries;
  162. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  163.           XtScrollBarSetThumb(
  164. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  165. +         XawScrollBarSetThumb(
  166. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  167.               w,
  168.               f,
  169.               (float) (((double) ((dir->nEntries < SFlistSize) ?
  170. ***************
  171. *** 1000,1006 ****
  172. --- 1046,1058 ----
  173.           float    f;
  174.   
  175.           f = ((double) new) / dir->nChars;
  176. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  177.           XtScrollBarSetThumb(
  178. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  179. +         XawScrollBarSetThumb(
  180. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  181.               w,
  182.               f,
  183.               (float) (((double) ((dir->nChars < SFcharsPerEntry) ?
  184. ***************
  185. *** 1029,1037 ****
  186. --- 1081,1097 ----
  187.       int        n;
  188.   
  189.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT)
  190.       XwTextPosition    pos;
  191.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  192. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  193.       XtTextPosition    pos;
  194. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  195. +     XawTextPosition    pos;
  196. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  197.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  198.   
  199.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR)
  200. ***************
  201. *** 1067,1075 ****
  202. --- 1127,1143 ----
  203.       }
  204.   
  205.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT)
  206.       XwTextSetInsertPos(selFileField, pos);
  207.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  208. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  209.       XtTextSetInsertionPoint(selFileField, pos);
  210. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  211. +     XawTextSetInsertionPoint(selFileField, pos);
  212. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  213.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  214.   
  215.   }
  216. ***************
  217. *** 1122,1128 ****
  218. --- 1190,1202 ----
  219.           float    f;
  220.   
  221.           f = ((double) new) / SFdirEnd;
  222. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  223.           XtScrollBarSetThumb(
  224. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  225. +         XawScrollBarSetThumb(
  226. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  227.               w,
  228.               f,
  229.               (float) (((double) ((SFdirEnd < 3) ? SFdirEnd : 3)) /
  230. *** ../old/Imakefile    Mon Jan 29 13:56:48 1990
  231. --- Imakefile    Mon Jan 29 13:58:18 1990
  232. ***************
  233. *** 15,20 ****
  234. --- 15,25 ----
  235.   #
  236.   # -DSEL_FILE_XW
  237.   #
  238. + # By default, the program compiles correctly in the R4 environment, where Xaw
  239. + # header files are under <X11/Xaw/>. To compile in an earlier environment, use:
  240. + #
  241. + # -DSEL_FILE_PRE_R4_XAW_XMU
  242. + #
  243.   # Normally, the program should be linked with the R3 or a later version of the
  244.   # Xt Intrinsics, but it can be linked with the R2 Xt by defining the following:
  245.   #
  246. ***************
  247. *** 32,37 ****
  248. --- 37,43 ----
  249.   #------------------------------------------------------------------------------
  250.   #
  251.   #        DEFINES = -DSEL_FILE_XW
  252. +         DEFINES = CompatibilityFlags
  253.   
  254.              SRCS = xdir.c SelFile.c Dir.c Path.c Draw.c
  255.              OBJS = xdir.o SelFile.o Dir.o Path.o Draw.o
  256. *** ../old/Path.c    Mon Jan 29 13:57:09 1990
  257. --- Path.c    Mon Jan 29 13:58:19 1990
  258. ***************
  259. *** 1,5 ****
  260.   #ifndef lint
  261. ! static char rcsid[] = "$Header: Path.c,v 1.10 89/09/28 16:33:57 erik Exp $";
  262.   #endif
  263.   
  264.   /*
  265. --- 1,5 ----
  266.   #ifndef lint
  267. ! static char rcsid[] = "$Header: Path.c,v 1.2 89/12/15 11:59:24 kit Exp $";
  268.   #endif
  269.   
  270.   /*
  271. ***************
  272. *** 39,48 ****
  273. --- 39,56 ----
  274.   #include <sys/stat.h>
  275.   
  276.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR)
  277.   #include <Xw/Xw.h>
  278.   #include <Xw/ScrollBar.h>
  279.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR) */
  280. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  281.   #include <X11/Scroll.h>
  282. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  283. + #include <X11/Xaw/Scrollbar.h>
  284. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  285.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR) */
  286.   
  287.   #if defined(SYSV) || defined(USG)
  288. ***************
  289. *** 684,690 ****
  290. --- 692,704 ----
  291.           XtSetArg(arglist[i], XtNsliderOrigin, SFdirPtr);    i++;
  292.           XtSetValues(selFileHScroll, arglist, i);
  293.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR) */
  294. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  295.           XtScrollBarSetThumb(
  296. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  297. +         XawScrollBarSetThumb(
  298. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  299.               selFileHScroll,
  300.               (float) (((double) SFdirPtr) / SFdirEnd),
  301.               (float) (((double) ((SFdirEnd < 3) ? SFdirEnd : 3)) /
  302. ***************
  303. *** 738,750 ****
  304. --- 752,775 ----
  305.   
  306.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  307.       {
  308. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  309.           XtTextBlock    text;
  310. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  311. +         XawTextBlock    text;
  312. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  313.   
  314.           text.firstPos = 0;
  315.           text.length = strlen(path);
  316.           text.ptr = path;
  317.           text.format = FMT8BIT;
  318. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  319.           XtTextReplace(selFileField, 0, strlen(SFtextBuffer), &text);
  320. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  321. +         XawTextReplace(selFileField, 0, strlen(SFtextBuffer), &text);
  322. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  323.       }
  324.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  325.   
  326. *** ../old/SFinternal.h    Mon Jan 29 13:56:50 1990
  327. --- SFinternal.h    Mon Jan 29 13:58:19 1990
  328. ***************
  329. *** 1,4 ****
  330. ! /* $Header: SFinternal.h,v 1.6 89/08/30 15:59:46 erik Exp $ */
  331.   
  332.   /*
  333.    * Copyright 1989 Software Research Associates, Inc., Tokyo, Japan
  334. --- 1,4 ----
  335. ! /* $Header: SFinternal.h,v 1.7 89/10/31 18:36:41 erik Exp $ */
  336.   
  337.   /*
  338.    * Copyright 1989 Software Research Associates, Inc., Tokyo, Japan
  339. ***************
  340. *** 30,40 ****
  341. --- 30,49 ----
  342.   #include <X11/Xos.h>
  343.   
  344.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT)
  345.   #include <Xw/Xw.h>
  346.   #include <Xw/TextEdit.h>
  347.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  348. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  349.   #include <X11/Text.h>
  350.   #include <X11/AsciiText.h>
  351. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  352. + #include <X11/Xaw/Text.h>
  353. + #include <X11/Xaw/AsciiText.h>
  354. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  355.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  356.   
  357.   #define SEL_FILE_CANCEL        -1
  358. ***************
  359. *** 94,102 ****
  360. --- 103,119 ----
  361.   extern XSegment SFsegs[], SFcompletionSegs[];
  362.   
  363.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT)
  364.   extern XwTextPosition SFtextPos;
  365.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  366. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  367.   extern XtTextPosition SFtextPos;
  368. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  369. + extern XawTextPosition SFtextPos;
  370. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  371.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  372.   
  373.   extern void
  374. *** ../old/SelFile.c    Mon Jan 29 13:57:06 1990
  375. --- SelFile.c    Mon Jan 29 13:58:19 1990
  376. ***************
  377. *** 1,5 ****
  378.   #ifndef lint
  379. ! static char rcsid[] = "$Header: SelFile.c,v 1.13 89/10/27 15:41:26 erik Exp $";
  380.   #endif
  381.   
  382.   /*
  383. --- 1,5 ----
  384.   #ifndef lint
  385. ! static char rcsid[] = "$Header: SelFile.c,v 1.2 89/12/15 11:59:32 kit Exp $";
  386.   #endif
  387.   
  388.   /*
  389. ***************
  390. *** 54,84 ****
  391. --- 54,116 ----
  392.   #include <X11/Shell.h>
  393.   
  394.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWFORM)
  395.   #include <Xw/Xw.h>
  396.   #include <Xw/Form.h>
  397.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWFORM) */
  398. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  399.   #include <X11/Form.h>
  400. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  401. + #include <X11/Xaw/Form.h>
  402. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  403.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWFORM) */
  404.   
  405.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWPUSHBUTTON)
  406.   #include <Xw/Xw.h>
  407.   #include <Xw/PButton.h>
  408.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWPUSHBUTTON) */
  409. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  410.   #include <X11/Command.h>
  411. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  412. + #include <X11/Xaw/Command.h>
  413. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  414.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWPUSHBUTTON) */
  415.   
  416.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR)
  417.   #include <Xw/Xw.h>
  418.   #include <Xw/ScrollBar.h>
  419.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR) */
  420. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  421.   #include <X11/Scroll.h>
  422. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  423. + #include <X11/Xaw/Scrollbar.h>
  424. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  425.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSCROLLBAR) */
  426.   
  427.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWSTATICTEXT)
  428.   #include <Xw/Xw.h>
  429.   #include <Xw/SText.h>
  430.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSTATICTEXT) */
  431. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  432.   #include <X11/Label.h>
  433. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  434. + #include <X11/Xaw/Label.h>
  435. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  436.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWSTATICTEXT) */
  437.   
  438.   #include "SFinternal.h"
  439. ***************
  440. *** 123,131 ****
  441. --- 155,171 ----
  442.   XSegment SFsegs[2], SFcompletionSegs[2];
  443.   
  444.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT)
  445.   XwTextPosition SFtextPos;
  446.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  447. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  448.   XtTextPosition SFtextPos;
  449. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  450. + XawTextPosition SFtextPos;
  451. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  452.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  453.   
  454.   int SFupperX, SFlowerY, SFupperY;
  455. ***************
  456. *** 341,347 ****
  457.       u_char        cstr[256];
  458.   #endif /* def SEL_FILE_JAPANESE */
  459.   
  460. !     Arg        arglist[20];
  461.   
  462.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT)
  463.       SFfieldData    *data;
  464. --- 381,387 ----
  465.       u_char        cstr[256];
  466.   #endif /* def SEL_FILE_JAPANESE */
  467.   
  468. !     Arg        arglist[24];
  469.   
  470.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT)
  471.       SFfieldData    *data;
  472. ***************
  473. *** 488,493 ****
  474. --- 528,535 ----
  475.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  476.       XtSetArg(arglist[i], XtNstring, SFtextBuffer);            i++;
  477.       XtSetArg(arglist[i], XtNlength, MAXPATHLEN);            i++;
  478. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  479.       XtSetArg(arglist[i], XtNeditType, XttextEdit);            i++;
  480.       XtSetArg(arglist[i], XtNtextOptions,    0        |
  481.                           editable    |
  482. ***************
  483. *** 494,501 ****
  484. --- 536,555 ----
  485.                           resizeHeight    |
  486.                           wordBreak    |
  487.                           0);            i++;
  488. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  489. +     XtSetArg(arglist[i], XtNeditType, XawtextEdit);            i++;
  490. +     XtSetArg(arglist[i], XtNwrap, XawtextWrapWord);            i++;
  491. +     XtSetArg(arglist[i], XtNresize, XawtextResizeHeight);        i++;
  492. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  493. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  494.       selFileField = XtCreateManagedWidget("selFileField",
  495.           asciiStringWidgetClass, selFileForm, arglist, i);
  496. + #else
  497. +     selFileField = XtCreateManagedWidget("selFileField",
  498. +         asciiTextWidgetClass, selFileForm, arglist, i);
  499. + #endif
  500.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  501.   
  502.       XtOverrideTranslations(selFileField,
  503. ***************
  504. *** 930,938 ****
  505. --- 984,1000 ----
  506.           (void) strcpy(SFcurrentPath, SFtextBuffer);
  507.   
  508.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT)
  509.           SFtextPos = XwTextGetInsertPos(selFileField);
  510.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  511. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  512.           SFtextPos = XtTextGetInsertionPoint(selFileField);
  513. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  514. +         SFtextPos = XawTextGetInsertionPoint(selFileField);
  515. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  516.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  517.   
  518.       } else {
  519. ***************
  520. *** 939,949 ****
  521. --- 1001,1020 ----
  522.           (void) strcat(strcpy(SFcurrentPath, SFstartDir), SFtextBuffer);
  523.   
  524.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT)
  525.           SFtextPos = XwTextGetInsertPos(selFileField) +
  526.               strlen(SFstartDir);
  527.   #else /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  528. + #ifdef SEL_FILE_PRE_R4_XAW_XMU
  529.           SFtextPos = XtTextGetInsertionPoint(selFileField) +
  530.               strlen(SFstartDir);
  531. + #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  532. +         SFtextPos = XawTextGetInsertionPoint(selFileField) +
  533. +             strlen(SFstartDir);
  534. + #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  535.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  536.   
  537.       }
  538.  
  539. dan
  540. -----------------------------------------------------------
  541.             O'Reilly && Associates
  542.         argv@sun.com / argv@ora.com
  543.        632 Petaluma Ave, Sebastopol, CA 95472 
  544.      800-338-NUTS, in CA: 800-533-NUTS, FAX 707-829-0104
  545.     Opinions expressed reflect those of the author only.
  546.